package com.itgone.common;


/**
 * @author Earlman
 *
 *         2018年5月25日
 */
public class ServerResponse<T> {
	private int status;
	private String msg;
	private T data;

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public boolean isSuccess() {
		return this.status == ResponseCode.SUCCESS.getCode();
	}


	@Override
	public String toString() {
		return "ServerResponse{" +
				"status=" + status +
				", msg='" + msg + '\'' +
				", data=" + data +
				'}';
	}
}
